import requests
# 基础的url
base_url = "https://baidu.com/s"
# 伪装请求头
header = {
    "user-agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"
}
# 设置get参数
param = {"wd":"python"}
# 进行get请求
response = requests.get(base_url,params=param,headers=header)
# 指定编码方式
response.encoding = "utf-8"
# 保存文件
with open("get参数1.html","w+",encoding="utf-8") as f:
    f.write(response.text)